/*******************************************************************************
 * Copyright (c) 2002 David Corbin and others. All rights reserved. This program
 * and the accompanying materials are made available under the terms of the
 * Common Public License v0.5 which accompanies this distribution, and is
 * available at http://www.eclipse.org/legal/cpl-v05.html
 * 
 * Contributors: Boris Pruessmann - Initial implementation
 ******************************************************************************/
package net.sourceforge.perforce.core;

import net.sourceforge.perforce.core.api.IPerforceServer;
import net.sourceforge.perforce.core.internal.api.ChangeSpec;

import org.eclipse.core.runtime.IStatus;

/**
 * @version $Revision: 488 $
 * @author <a href="mailto:bpruessmann@users.sourceforge.net">Boris
 *         Pruessmann</a>
 */
public interface ISubmitValidator {
  /**
   * Called to validate the given changeSpec.
   * 
   * @param server the perforce server.
   * @param changeSpec the ChangeSpec to validate.
   * @return if the returned status isOk() then the submit operation will
   *         continue. Otherwise it'll be aborted.
   */
  IStatus validateChangeSpec(IPerforceServer server, ChangeSpec changeSpec);
}
